package com.rico.deploy.service.impl;

import com.rico.deploy.entity.Roles;
import com.rico.deploy.mapper.RolesMapper;
import com.rico.deploy.service.RolesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

/**
 * @author 夏智力
 * @FileName RolesServiceImpl
 * @date 2021/4/24 9:33
 * @Software: IntelliJ IDEA
 */
@Service
public class RolesServiceImpl implements RolesService {

    @Autowired
    private RolesMapper rolesMapper;

    @Override
    public Roles selectRolesById(Integer id) {
        Example example = new Example(Roles.class);
        example.createCriteria()
                .andEqualTo("id",id);
        return rolesMapper.selectOneByExample(example);
    }
}
